home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Format CD 38
/
Amiga Format CD38 (1999-03-15)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-04].iso
/
-seriously_amiga-
/
misc
/
ced_html
/
html
/
html_table_header.ced
< prev
next >
Wrap
Text File
|
1999-01-25
|
4KB
|
149 lines
/*
** html_table_header.ced
**
** $VER: html_table_header.ced 1.1 (12.07.1998)
**
** Arexx script for HTML v3.2 table header cell options
**
** This script works with CygnusEd Professional v4.2
**
** Copyright © Eric BELLE
*/
/*
**------------------------------------------------------------------------------
** Initialisation
**------------------------------------------------------------------------------
*/
OPTIONS RESULTS /* Tell CygnusEd to return results. */
NL = '0A'X /* Alias for new line. */
KRETURN = RAWKEY 68 /* Shortcut to the return key. */
KTAB = RAWKEY 66 /* Shortcut to the tab key. */
STATUS TABSARESPACES /* Return TAB mode ("tab" or "space"). */
IF RESULT = 1 /* Test the TAB mode. */
THEN "TABS = SPACES" /* Switch TAB mode from "space" to "tab". */
ELSE NOP /* No operation. */
TAB SIZE 1 /* Set TAB size proportional to 2 spaces. */
/*
**------------------------------------------------------------------------------
** Horizontal position
**------------------------------------------------------------------------------
*/
HorizontalPosition = "q"
DO WHILE ~(HorizontalPosition="l" | HorizontalPosition="c" | HorizontalPosition="r",
| HorizontalPosition=" " | HorizontalPosition="RESULT")
GETSTRING "c" '"Horizontal position: (l)eft, (c)enter, (r)ight?"'
HorizontalPosition = RESULT
END
IF (HorizontalPosition="RESULT" | HorizontalPosition=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Vertical position
**------------------------------------------------------------------------------
*/
VerticalPosition = "q"
DO WHILE ~(VerticalPosition="t" | VerticalPosition="b" | VerticalPosition="m",
| VerticalPosition=" " | VerticalPosition="RESULT")
GETSTRING "m" '"Vertical position: (t)op, (m)iddle, (b)ottom?"'
VerticalPosition = RESULT
END
IF (VerticalPosition="RESULT" | VerticalPosition=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Cell color
**------------------------------------------------------------------------------
*/
GETSTRING "#7070FF" '"Cell color (#RGB)?"'
CellColor = RESULT
IF (CellColor="RESULT" | CellColor=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Cell width
**------------------------------------------------------------------------------
*/
GETSTRING "100%" '"Cell width (pixels or browser window %)?"'
CellWidth = RESULT
IF (CellWidth="RESULT" | CellWidth=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Cell height
**------------------------------------------------------------------------------
*/
GETSTRING "100%" '"Cell height (pixels or browser window %)?"'
CellHeight = RESULT
IF (CellHeight="RESULT" | CellHeight=" ")
THEN EXIT 0
ELSE NOP
/*
**------------------------------------------------------------------------------
** Html table header cell marks
**------------------------------------------------------------------------------
*/
SELECT
WHEN (HorizontalPosition="c") THEN HorizontalPositionString = " ALIGN=CENTER"
WHEN (HorizontalPosition="l") THEN HorizontalPositionString = " ALIGN=LEFT"
WHEN (HorizontalPosition="r") THEN HorizontalPositionString = " ALIGN=RIGHT"
OTHERWISE NOP
END
SELECT
WHEN (VerticalPosition="t") THEN VerticalPositionString = " VALIGN=TOP"
WHEN (VerticalPosition="m") THEN VerticalPositionString = " VALIGN=MIDDLE"
WHEN (VerticalPosition="b") THEN VerticalPositionString = " VALIGN=BOTTOM"
OTHERWISE NOP
END
OpenCell = "<TH"
OpenCell = OpenCell || HorizontalPositionString
OpenCell = OpenCell || VerticalPositionString
OpenCell = OpenCell || " WIDTH=" || CellWidth
OpenCell = OpenCell || " HEIGHT=" || CellHeight
OpenCell = OpenCell || " BGCOLOR=" || CellColor || ">"
CloseCell = "</TH>"
/*
**------------------------------------------------------------------------------
** Html table header cell structure
**------------------------------------------------------------------------------
*/
TEXT OpenCell
"AUTO-INDENT" ; KTAB
TEXT "Should be modified - Main cell"
"AUTO-INDENT" ; BACKTAB
TEXT CloseCell
/*
**------------------------------------------------------------------------------
** End of html_table_header.ced Arexx script
**------------------------------------------------------------------------------
*/
EXIT 0